<?php
/**
 * Model class for Option Unit Type
 *
 * @access 	public
 * @author 	Rob
 * @copyright	ResMania 2009 all rights reserved.
 * @version	1.0
 * @link	http://developer.resmania.com/api
 * @since  	11-2009
 */
class RM_OptionType extends RM_Model {
    protected $_name = 'rm_units';
    var $_unitTypeID = 6;

    /**
     * Returns All non-Option Units
     *
     * @return Zend_Db_Table_Rowset
     */
    function getAllNonOptionUnits(){
        return $this->fetchAll("type_id != '".$this->_unitTypeID."'");
    }

    /**
     * Returns all option units1
     *
     * @return Zend_Db_Table_Rowset
     */
    function getAllOptionUnits($limit = null){

        $where = "type_id = '".$this->_unitTypeID."'";
        $returnVal = $this->fetchAll($where, null, $limit);
        return $returnVal;
        
    }
}